<template>
  <div>
    <v-scale-screen
      width="6240"
      height="1404"
      :boxStyle="{
        backgroundColor: '#05163d',
      }"
    >
      <div class="wrapper">
        <div class="jump" style="color: #909399; border: 1px solid #909399; cursor: not-allowed">保租房</div>
        <div class="jump" style="left: 3.8%">
          <router-link to="/guarantee" style="color: #fff">公租房</router-link>
        </div>
        <div class="column">
          <left1 :areaID="areaid" @fullScreen="handleFullScreen('left1')"></left1>
          <left2 :areaID="areaid" @fullScreen="handleFullScreen('left2')"></left2>
          <left3 :areaID="areaid" @fullScreen="handleFullScreen('left3')"></left3>
        </div>
        <div style="position: absolute; bottom: 50px; left: 38%; z-index: 99">
          <div class="bt" @click="ljtVisible = true">逻辑图</div>
        </div>
        <div class="column" style="flex: 0.7">
          <mapCharts @updateAreaID="updateAreaID"></mapCharts>
        </div>
        <div class="column">
          <right1 :areaID="areaid" @fullScreen="handleFullScreen('right1')"></right1>
          <right2 :areaID="areaid" @fullScreen="handleFullScreen('right2')"></right2>
          <right3 :areaID="areaid" @fullScreen="handleFullScreen('right3')"></right3>
        </div>
      </div>
    </v-scale-screen>
    <a-modal
      class="full-modal"
      :visible="visibleFullScreen"
      @cancel="handleCancel"
      width="90%"
      centered
      destroyOnClose
      :footer="null"
    >
      <component :is="fullComponent" :areaID="areaid" class="full-screen" :isFullscren="isFullscren"></component>
    </a-modal>
    <a-modal
      class="full-modal"
      :visible="ljtVisible"
      @cancel="ljtVisible = false"
      width="70%"
      centered
      destroyOnClose
      :footer="null"
    >
      <div style="font-size: 20px; color: #fff; transform: translateY(-20px)">逻辑图</div>
      <img style="height: 80vh; width: 100%" src="@/assets/bg.jpg" alt="" />
    </a-modal>
  </div>
</template>

<script>
import { setDocumentTitle } from '@/utils/domUtil'
import mapCharts from './components/map'
import right1 from './components/right1'
import right2 from './components/right2'
import right3 from './components/right3'
import left1 from './components/left1'
import left2 from './components/left2'
import left3 from './components/left3'

export default {
  name: 'BzfDataScreen',
  components: {
    mapCharts,
    right1,
    right2,
    right3,
    left1,
    left2,
    left3,
  },
  data() {
    return {
      visibleFullScreen: false,
      isFullscren: false,
      ljtVisible: false,
      fullComponent: '',
      areaid: '',
    }
  },
  created() {
    setDocumentTitle('住房保障智慧数据展示平台')
  },
  methods: {
    handleFullScreen(name) {
      this.visibleFullScreen = true
      this.isFullscren = true
      this.fullComponent = name
    },
    updateAreaID(id) {
      this.areaid = id
    },
    handleCancel() {
      this.visibleFullScreen = false
      this.isFullscren = false
    },
  },
}
</script>

<style lang="less" scoped>
.back {
  position: absolute;
  z-index: 999;
  top: 100px;
  left: 45%;
  /deep/ .y-button--primary {
    background-color: transparent;
  }
}
.full-modal {
  /deep/ .ant-modal-body {
    padding: 46px;
    background-color: #05163d;
  }
  /deep/ .ant-modal-close-icon {
    color: #fff;
  }
  /deep/ .full-screen {
    color: #fff;
    .anticon-fullscreen {
      display: none;
    }
  }
}
.wrapper {
  width: 6240px;
  height: 1404px;
  background-image: url(../../../assets/images/bzfdp.png);
  background-size: 100% 100%;
  background-position: center center;
  background-repeat: no-repeat;
  display: flex;
  color: #fff;
  box-sizing: border-box;
  padding: 130px 30px 30px;
  font-size: calc(100vw * 14 / 8320);
  .column {
    flex: 1;
    min-width: 100px;
    position: relative;
    &:nth-child(2) {
      flex: 1;
      margin: 30px;
    }
  }
  .jump {
    position: absolute;
    left: 2%;
    top: 3%;
    color: #fff;
    border-radius: 2px;
    border: 1px solid #117f98;
    padding: 7px 15px;
    font-size: 20px;
    cursor: pointer;
    user-select: none;
  }
  .bt {
    color: #fff;
    border-radius: 2px;
    border: 1px solid #117f98;
    padding: 7px 15px;
    font-size: 20px;
    cursor: pointer;
    user-select: none;
  }
}
/deep/ .border-line {
  box-sizing: border-box;
  width: 100%;
  min-height: 100px;
  position: relative;
  border: 1px solid red;
  border-image: url(../../../assets/images/charts-border.png) 1 1;
  padding: 20px;
  margin-bottom: 20px;
}
</style>
